﻿#region BarChartCylindarAxis UI Control
//
// All rights are reserved. Reproduction or transmission in whole or in part, in 
// any form or by any means, electronic, mechanical or otherwise, is prohibited 
// without the prior written consent of the copyright owner.
// 
// Filename: BarChartCylindarAxis.xaml.cs
//
#endregion 
using System;
using System.Runtime.Serialization;
//using System.Windows;
//using System.Windows.Controls;
//using System.Windows.Documents;
//using System.Windows.Ink;
//using System.Windows.Input;
//using System.Windows.Media;
//using System.Windows.Media.Animation;
//using System.Windows.Shapes;


namespace DiscoveryLogic.DataServices.DataObjects
{
    /// <summary>
    /// Mortgage Account entity class
    /// </summary>
    [DataContract] 
    public class MortgageAccount:Account
    {
        /// <summary>
        /// holder for interest rate
        /// </summary>
        private double interestRate;

        /// <summary>
        /// holder for amount past due
        /// </summary>
        private double amountPastDue;

        /// <summary>
        /// holder for next payment principal amount
        /// </summary>
        private double nextPaymentPrincipal;

        /// <summary>
        /// holder for next payment interest amount
        /// </summary>
        private double nextPaymentInterest;

        /// <summary>
        /// holder for estimated payments complete date
        /// </summary>
        private DateTime projectedPaymentCompleteDate;

        /// <summary>
        /// holder for payment schedule
        /// </summary>
        private AmortizationSchedule paymentSchedule;

        /// <summary>
        /// holder for payment schedule
        /// </summary>
        private double taxValueHouse;

        /// <summary>
        /// getter/setter for interest rate
        /// </summary>
        [DataMember]
        public double InterestRate { get { return interestRate; } set { interestRate = value; Notify(); } }

        /// <summary>
        /// getter/setter for amount past due
        /// </summary>
        [DataMember]
        public double AmountPastDue { get { return amountPastDue; } set { amountPastDue = value; Notify(); } }

        /// <summary>
        /// getter/setter for next payment principal
        /// </summary>
        [DataMember]
        public double NextPaymentPrincipal { get { return nextPaymentPrincipal; } set { nextPaymentPrincipal = value; Notify(); } }

        /// <summary>
        /// getter/setter for the next payment interest amount
        /// </summary>
        [DataMember]
        public double NextPaymentInterest { get { return nextPaymentInterest; } set { nextPaymentInterest = value; Notify(); } }

        /// <summary>
        /// getter/setter for projected payment complete date
        /// </summary>
        [DataMember]
        public DateTime ProjectedPaymentCompleteDate { get { return projectedPaymentCompleteDate; } set { projectedPaymentCompleteDate = value; Notify(); } }

        /// <summary>
        /// getter/setter for payment schedule
        /// </summary>
        [DataMember]
        public AmortizationSchedule PaymentSchedule { get { return paymentSchedule; } set { paymentSchedule = value; Notify(); } }

        /// <summary>
        /// getter/setter for tax value of house
        /// </summary>
        [DataMember]
        public double TaxValueHouse { get { return taxValueHouse; } set { taxValueHouse = value; Notify(); } }

        /// <summary>
        /// Constructor
        /// </summary>
        public MortgageAccount():this(0,string.Empty,AccountType.Savings,0,0,DateTime.MaxValue,0)
        {

        }


        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="id">system account id</param>
        /// <param name="accountNumber">account number</param>
        /// <param name="type">account type</param>
        /// <param name="balance">outstanding balance</param>
        /// <param name="minimumPayment">minimum payment</param>
        /// <param name="nextPaymentDueDate">next payment date</param>
        /// <param name="nextPaymentAmount">next payment amount</param>
        public MortgageAccount(int id,
            string accountNumber,
            AccountType type,
            double balance,
            double minimumPayment,
            DateTime nextPaymentDueDate,
            double nextPaymentAmount
            ):this(id, accountNumber, type, balance,minimumPayment,nextPaymentDueDate,nextPaymentAmount,0,0,0,0,DateTime.MaxValue,null,0)
        {
            
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="id">system account id</param>
        /// <param name="accountNumber">account number</param>
        /// <param name="type">account type</param>
        /// <param name="balance">outstanding balance</param>
        /// <param name="minimumPayment">minimum payment</param>
        /// <param name="nextPaymentDueDate">next payment date</param>
        /// <param name="nextPaymentAmount">next payment amount</param>
        /// <param name="interestRate">current interest rate</param>
        /// <param name="amountPastDue">amount past due</param>
        /// <param name="nextPaymentPrincipal">next payment principal component</param>
        /// <param name="nextPaymentInterest">next payment interest component</param>
        /// <param name="projectedPaymentCompleteDate">estimated completion date</param>
        /// <param name="paymentSchedule">payment schedule</param>
        public MortgageAccount(int id,
            string accountNumber,
            AccountType type,
            double balance,
            double minimumPayment,
            DateTime nextPaymentDueDate,
            double nextPaymentAmount,
            double interestRate,
            double amountPastDue,
            double nextPaymentPrincipal,
            double nextPaymentInterest,
            DateTime projectedPaymentCompleteDate,
            AmortizationSchedule paymentSchedule,
            double taxValueOfHouse
            )
            : base(id, accountNumber, type, balance, minimumPayment, nextPaymentDueDate, nextPaymentAmount)
        {
            this.interestRate = interestRate;
            this.amountPastDue = amountPastDue;
            this.nextPaymentInterest = nextPaymentInterest;
            this.nextPaymentPrincipal = nextPaymentPrincipal;
            this.projectedPaymentCompleteDate = projectedPaymentCompleteDate;
            this.paymentSchedule = paymentSchedule;
            this.taxValueHouse = taxValueOfHouse;
        }


    }
}
